package work20240719;

public class work6 {
    public static void main(String[] args) {
        deleteString("java woaijava,i liek jajavava,i enjoy java","java");
    }
    public static void deleteString(String orginString,String deleteString) {
        String resultString = new String();
        resultString = orginString;
        while(resultString.contains("java")){
            resultString = resultString.replace(deleteString,"");
        }
        System.out.println(resultString);
    }
}
